import request from "@/utils/request";
import { stringify } from "qs";
import { toFormData } from "@/utils/utils.jsx";
// 清点列表
export async function getMakeinventoryPage(params) {
	return request(`/new-wms/arrival/makeinventory/page?${stringify(params)}`, { loading: true });
}
// 历史清点明细接口
export async function getHistorycountingdetailsList(params) {
	return request(`/new-wms/historycountingdetails/page?${stringify(params)}`, { loading: true });
}

// 完成清点
export async function makeinventoryComplete(params) {
	return request(`/new-wms/arrival/makeinventory/complete`, {
		method: "post",
		data: params,
		loading: true
	});
}
// 完成支付
export async function makeinventoryPay(params) {
	return request(`/new-wms/arrival/makeinventory/pay`, {
		method: "post",
		data: params,
		loading: true
	});
}
//区域编码模糊查询
export async function queryAreaCode(params) {
	return request(`/zjf-wms/storecodesort/selectListByName?${stringify(params)}`);
}

//修改规则配置
export async function checkprintruleUpdateOp(params) {
	return request(`/new-wms/arrival/makeinventory/update/config`, {
		method: "post",
		data: params,
		loading: true
	});
}
//
export async function getCheckprintruleOp(params) {
	return request(`/zjf-wms/checkprintrule/detail?${stringify(params)}`, { loading: true });
}

//清点规则配置详情
export async function getmakeinventoryConfig(params) {
	return request(`/new-wms/arrival/makeinventory/get/config?${stringify(params)}`, { loading: true });
}
// 扫码填充
export async function makeinventoryScanCode(params) {
	return request(`/new-wms/arrival/makeinventory/scan/code`, {
		method: "post",
		data: params,
		loading: true
	});
}

// 支付
export async function outboundproductsPay(params) {
	return request(`/new-wms/outboundproducts/pay`, {
		method: "post",
		data: params,
		loading: true
	});
}
// 快递公司列表
export async function queryExpressList(params) {
	return request(`/blade-logistics/expresskxerp/expressKv?${stringify(params)}`, { loading: true });
}
// 获取支付详情
export async function cashpaymentMethod(params) {
	return request(`/new-wms/arrival/makeinventory/cashpayment/method`, {
		method: "post",
		data: params,
		loading: true
	});
}

// 获取打印详情
export async function cashpaymentPrint(params) {
	return request(`/new-wms/arrival/makeinventory/print`, {
		method: "post",
		data: params,
		loading: true
	});
}

// 唯一码打印成功后请求
export async function updatePrint(params) {
	return request(`/new-wms/arrival/makeinventory/update/print?${stringify(params)}`);
}

// 快递批量打印成功通知
export async function batchPrintByExpressSuccessNotify(params) {
	return request(`/new-wms/outboundorder/batch-print-by-express-success-notify`, {
		method: "Post",
		data: params
	});
}

// 保存打印记录
export async function saveCodePrintTask(params) {
	return request(`/new-oms-ec/printTask/saveCodePrintTask`, {
		method: "post",
		data: params,
	});
}

//获取快麦唯一码打印数据
export async function getKuaiMaiPrint(params) {
	return request(`/new-wms/kuaimai/getKuaiMaiCodePrintList`, {
		method: "post",
		data: params,
	});
}